﻿using Abp.Dependency;
using DotNetCore.CAP;
using EasyCaching.Core.Internal;
using Hicap.QRCodeWarehouse.Core.Models.DbSet;
using Hicap.QRCodeWarehouse.Core.Models.Transfer;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Hicap.QRCodeWarehouse.Core.Managers
{
    public interface IFileRepositoryManager : IManagerBase<FileRepository>,
        IEasyCaching,
        ITransientDependency,
        ICapSubscribe
    {
        Task MakeDataFile(TakeFileCommandDto cmd);

        Task<ActionResult> DispatchCodeTakenFeedback(TakeFileFeedbackDto data);

        Task ImportDataFile(ImportFileCommandDto cmd);

        Task<ActionResult> DispatchCodeImportFeedback(ImportFileFeedbackDto data);

        Task Upload(FileRepository input, Stream inStream);

        Task Download(int id, Stream outStream);

        Task RestoreWithRecycleBin(int input, bool isBatch = false);

        Task BatchRestoreWithRecycleBin(List<int> input);

        IQueryable<FileRepository> GetQueryWithRecycleBin(Expression<Func<FileRepository, bool>> predicate);

        Task DeleteWithRecycleBin(int input, bool isBatch = false);

        Task BatchDeleteWithRecycleBin(List<int> input);

        void FinalImportFeedBackMessage(ActionResult result);

        void FinalFeedBackMessage(ActionResult result);
    }
}